from selenium import webdriver
import time

from selenium.webdriver.common.by import By

driver = webdriver.Chrome()

driver.get("http://www.tpshop.com/index.php")
time.sleep(3)

driver.find_element(By.ID,"q").send_keys("小米手机")
driver.find_element(By.CLASS_NAME,"ecsc-search-button").click()
driver.find_element(By.CLASS_NAME,"lazy-list").click()
driver.find_element(By.CLASS_NAME,"addcar").click()


time.sleep(10)

driver.quit()























